<template>
  <basic-card
    :title="$t('menu.monitor_history')"
    :iconClass="'iconfont icon-shexiangtou'">
    <div class="really-time-container">

      <el-row :gutter="20">

        <!--      时间选择器-->
        <el-col :span="24">
          <el-card>
            <div slot="header" class="clearfix">
              <span>录像回放</span>
            </div>

            <el-col :span="18">
              <el-date-picker
                v-model="value2"
                align="right"
                type="date"
                placeholder="选择日期"
                :picker-options="pickerOptions">
              </el-date-picker>
              <el-button type="primary" plain>查询</el-button>
              <el-divider></el-divider>
              <div class="content-container">
                <el-tabs v-model="activeName" @tab-click="handleClick">
                  <!--              单分屏-->
                  <!--              <el-tab-pane label="单屏" name="first">-->
                  <div class="monitor-container">
                    <div class="monitor-1">
                      <div class="str">无信号</div>
                    </div>
                  </div>
                </el-tabs>
              </div>

              <el-card style="margin-top: 20px;margin-bottom: 20px">
                <el-slider v-model="value1"></el-slider>
              </el-card>
            </el-col>

            <!--      树-->
            <el-col :span="6" class="radio-1 ">
              <el-card class="card-center">
                <div slot="header" class="clearfix">
                  <span>组织</span>
                </div>
                <div class="tree-container">
                  <el-tree :data="groupTree"></el-tree>
                </div>
              </el-card>
            </el-col>

          </el-card>
        </el-col>
      </el-row>
    </div>
  </basic-card>
</template>
<script lang="ts">
import Vue from 'vue'
import BasicCard from "@/components/Basic/Card/BasicCard.vue";
import BasicTable from "@/components/Basic/Table/BasicTable.vue";
import BasicDeleteDialop from "@/components/Basic/Dialop/BasicDeleteDialop.vue";

export default Vue.extend({
  components: { BasicCard, BasicTable, BasicDeleteDialop },
  data() {
    return {
      activeName: "first",
      pickerOptions: {
        disabledDate(time: any) {
          return time.getTime() > Date.now();
        },
        shortcuts: [{
          text: '今天',
          onClick(picker: any) {
            picker.$emit('pick', new Date());
          }
        }, {
          text: '昨天',
          onClick(picker: any) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24);
            picker.$emit('pick', date);
          }
        }, {
          text: '一周前',
          onClick(picker: any) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', date);
          }
        }]
      },
      value2:'',
      groupTree: [
        {
          label: "一级 1",
          children: [
            {
              label: "二级 1-1",
              children: [
                {
                  label: "三级 1-1-1",
                },
              ],
            },
          ],
        },
        {
          label: "一级 2",
          children: [
            {
              label: "二级 2-1",
              children: [
                {
                  label: "三级 2-1-1",
                },
              ],
            },
            {
              label: "二级 2-2",
              children: [
                {
                  label: "三级 2-2-1",
                },
              ],
            },
          ],
        },
        {
          label: "一级 3",
          children: [
            {
              label: "二级 3-1",
              children: [
                {
                  label: "三级 3-1-1",
                },
              ],
            },
            {
              label: "二级 3-2",
              children: [
                {
                  label: "三级 3-2-1",
                },
              ],
            },
          ],
        },
      ],
      monitorList: [
        {
          name: "监控一",
          position: "位置一",
        },
        {
          name: "监控二",
          position: "位置二",
        },
        {
          name: "监控三",
          position: "位置三",
        },
        {
          name: "监控四",
          position: "位置四",
        },
      ],
    };
  }
})
</script>
<style lang="scss" scoped>
.really-time-container {
  width: 100%;
  //display: flex;

  .tree-container {
    width: 200px;
    //padding-top: 30px;
    flex-shrink: 0;
  }

  .content-container {
    flex-grow: 1;

    .monitor-container {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      .monitor-1 {
        color: #fff;
        width: 100%;
        height:67.5vh;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #000;
      }

      .monitor-4 {
        color: #fff;
        width: 45%;
        height: 33.75vh;
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #000;
        border: 1px solid #cccccc;
      }
      .monitor-9 {
        color: #fff;
        width: 33%;
        height: 22.5vh;
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #000;
        border: 1px solid #cccccc;
      }
      .monitor-16 {
        color: #fff;
        width: 22.5%;
        height: 16.87vh;
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #000;
        border: 1px solid #cccccc;
      }
      .monitor-25 {
        color: #fff;
        width: 20%;
        height: 13.5vh;
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #000;
        border: 1px solid #cccccc;
      }
    }
  }
}
.radio-1{
  margin-top: 5px;
}
.card-center{
  min-height: calc(100vh - 150px);
}
</style>
